int NbSites = ...;
int NbClients = ...;
range Sites = 1..NbSites;
range Clients = 1..NbClients;
int Cout[Sites] = ...;
int Besoin[Clients] = ...;
int Distance[Sites][Clients] = ...;
int Capacity_min[Sites] = ...;
int Capacity_max[Sites] = ...;
float rho = 3*10^(-8);
int s = 500;
int I = 400;
int U = 90;

dvar float x_ij[Sites][Clients];

minimize
  sum(i in Sites) sum(j in Clients) x_ij[i][j] * Cout[i];
  
subject to {
	forall( j in Clients ){
		ctBesoin: sum( l in Sites ) (1 - rho*I*Distance[l][j]/(s*U))*x_ij[l][j] >= Besoin[j];
	}
    	forall( r in Sites ){
		ctPuissancemin: Capacity_min[r]*365*24 <= sum(j in Clients) x_ij[r][j];
		ctPuissancemax: sum(j in Clients) x_ij[r][j] <= Capacity_max[r]*365*24 + 1000000000;
	}
	forall(j in Clients ){
		forall(i in Sites)
			ctPositif: x_ij[i][j] >= 0;
	}
 	    
}

execute DISPLAY {
	for (var i in Sites)
		for (var j in Clients)
			writeln("x_ij[",i,"][",j,"] = <buy:",x_ij[i][j],">");
}

